<%@ include file="/WEB-INF/jsp/fragments/includes.jspf"%>
<%@ include file="/WEB-INF/jsp/fragments/header_top.jspf"%>

<title>Login page</title>
<script type="text/javascript"
	src="<c:url value='/resources/js/login.js'/>"></script>

<%@ include file="/WEB-INF/jsp/fragments/header_bottom.jspf"%>

<body>
	<h1>Login page</h1>
	<%@ include file="/WEB-INF/jsp/fragments/navigation.jspf"%>

	<c:if test="${not empty param.error}">
		<div class="error">
			<p>
				LOGIN ERROR<br /> Reason: ${SPRING_SECURITY_LAST_EXCEPTION.message}<br />
			</p>
		</div>
	</c:if>

	<c:url value="/auth/j_spring_security_check" var="authUrl" />
	<c:url value="/auth/register" var="signInUrl" />

	<form action="${authUrl}" method="POST" id="login-form">
		<fieldset>
			<legend>Enter Login and Password</legend>
			<ul>
				<li><label for="j_username">Login: </label><input type="text"
					name="j_username" id="username" /></li>
				<li><label for="j_password">Password: </label><input
					type="password" name="j_password" id="password" /></li>

				<li><label for="_spring_security_remember_me">Remember
						Me?</label><input class="box" type="checkbox"
					name="_spring_security_remember_me" checked="checked" /> <input
					id="login" class="submit" type="submit" value="Login" /></li>
			</ul>
			<div class="signin">
				<span>Not a member?</span> <a href="${signInUrl}">Sign In</a>
			</div>
		</fieldset>

	</form>


</body>
</html>
